]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
main: Unwatch notification proxy name after auto-start
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 12 Mar 2020 22:23:37 +0000 (23:23 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 12 Mar 2020 22:29:40 +0000 (23:29 +0100)
We only "watch" the 'org.gnome.Shell.Notifications' name to start the
service, not to actually monitor name owner changes; so unwatch the
name once that's done.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2381

js/ui/main.js

index 3d921409f6ca900c509801549f9d608b70807bfb..b2936042398ccd69772b2787f943158ce45c56e5 100644 (file)
@@ -142,8 +142,10 @@ function start() {
     shellDBusService = new ShellDBus.GnomeShell();
     shellMountOpDBusService = new ShellMountOperation.GnomeShellMountOpHandler();
 
-    Gio.DBus.session.watch_name('org.gnome.Shell.Notifications',
-        Gio.BusNameWatcherFlags.AUTO_START, null, null);
+    const watchId = Gio.DBus.session.watch_name('org.gnome.Shell.Notifications',
+        Gio.BusNameWatcherFlags.AUTO_START,
+        bus => bus.unwatch_name(watchId),
+        bus => bus.unwatch_name(watchId));
 
     _sessionUpdated();
 }